package day60;

import org.junit.Test;

public class Demo {
	// 春夏秋冬  男女   是否
	private static final int SHANG_JIA = 1;
	private static final int XIA_JIA = 0;
	
	private static final String MAN = "男"; 
	private static final String WOMAN = "女"; 

	public static void main(String[] args) {
		String name = MAN;
		if (name.equals("男")) {
			System.out.println("男");
		}
		
		if (name.equals(MAN)) {
			System.out.println("男");
		}
		
		// 从数据库查到的状态
		int status = 1;
		if (status == SHANG_JIA) {
			System.out.println("上架");
		}
	}
	
	@Test
	public void test1() {
		System.out.println(GenderEnum1.MAN);
		System.out.println(GenderEnum1.WOMAN);
	}
	
	@Test
	public void test2() {
		// 枚举里面的类型都是固定的
		GenderEnum genderEnum = GenderEnum.MAN;
		System.out.println(genderEnum);// MAN
		System.out.println(genderEnum.getValue());// 男
	}
	
	@Test
	public void test3() {
		// 从数据库里面拿出状态值
		int status = 1;
//		if (status == StatusEnum.SHANG_JIA.getValue()) {
//			System.out.println("上架");
//		}
	}
	
}
